/**
 * 作者: hxl
 * 日期: 2025-05-17 17:01:18
 * 备注: 用户联盟乱斗信息表
 */
package com.motu.monstercity.server.game.userdata;

import com.motu.vertx.module.utility.toolset.TimeUtils;

public class UserUnionScuffleGiftWeek extends UserUnionScuffleGiftWeekModel {
    public UserUnionScuffleGiftWeek() {
        super();
    }

    public UserUnionScuffleGiftWeek(long userId, int giftId) {
        putUserId(userId);
        putGiftId(giftId);
        putResetTime(TimeUtils.getCurTime());
    }

    public void reset() {
        if (!TimeUtils.isToday(resetTime)) {
            putBuyNum(0);
            putResetTime(TimeUtils.getCurTime());
            update();
        }
    }

}
